﻿//==============================================================================
// File: ViewSettings.cs
// Created: 2010-06-07
// Author: Piotr Włodek, Arkadiusz Świerczek
//==============================================================================
// This file is a part of MAMMOTH project.
// Copyright (C) 2010 AGH University of Science and Technology, Krakow.
// https://caribou.iisg.agh.edu.pl/trac/mammoth
//
// Mammoth is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// Mammoth is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with Mammoth. If not, see http://www.gnu.org/licenses/.
//==============================================================================

using System;
using WpfRcp.Core.Common;

namespace WpfRcp.Core.Views
{
    [Serializable]
    public sealed class ViewSettings : BindableBase
    {
        [NonSerialized]
        private bool m_IsNew;

        private bool m_IsMaximized;
        private double m_Width;
        private double m_Height;
        private double m_Top;
        private double m_Left;

        public ViewSettings()
        {
            IsNew = true;
        }
        
        public bool IsNew
        {
            get { return m_IsNew; }
            internal set { m_IsNew = value; }
        }

        /// <summary>
        /// Gets or sets value indicating whether the view is maximized or not.
        /// </summary>
        public bool IsMaximized
        {
            get { return m_IsMaximized; }
            set
            {
                m_IsMaximized = value;
                OnPropertyChanged("IsMaximized");
            }
        }

        /// <summary>
        /// Gets or sets width of the view.
        /// </summary>
        public double Width
        {
            get { return m_Width; }
            set
            {
                m_Width = value;
                OnPropertyChanged("Width");
            }
        }
        
        /// <summary>
        /// Gets or sets height of the view.
        /// </summary>
        public double Height
        {
            get { return m_Height; }
            set
            {
                m_Height = value;
                OnPropertyChanged("Width");
            }
        }
        
        /// <summary>
        /// Gets or sets top position  of the view.
        /// </summary>
        public double Top
        {
            get { return m_Top; }
            set
            {
                m_Top = value;
                OnPropertyChanged("Width");
            }
        }

        /// <summary>
        /// Gets or sets left position of the view.
        /// </summary>
        public double Left
        {
            get { return m_Left; }
            set
            {
                m_Left = value;
                OnPropertyChanged("Width");
            }
        }
    }
}